package ugraph;

import java.util.HashSet;
import java.util.Set;

import avp.EdgeState;

public class Edge implements UGraphComponent<Node> {

	private Set<Node> nodes= new HashSet<Node>();
	private EdgeState state;
	public String name;
	
	Edge(Node n1, Node n2, String n){
		setNode(n1);
		setNode(n2);
		n1.setEdge(this);
		n2.setEdge(this);
		name= n;
	}
	
	Edge() {
		this(new Node(""), new Node(""), ""); //change back
	}
	
	public Set<Node> getAdjacent() {
		return nodes;
	}
	
	public void setNode(Node n){
		nodes.add(n);
	}
	

}
